package com.jh.jutil.worker;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author namhh
 */
public abstract class Job implements Runnable{

    private String jobName;

    public String getJobName() {
        if (jobName == null || jobName.isEmpty()) {
            return " {JOB} " + this.hashCode() + " ";
        }
        return " {JOB} " + jobName + " ";
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    @Override
    public String toString() {
        return getJobName();
    }

}
